import request from '@/utils/request'

export default {
  // 添加课程
  addCourseInfo(courseInfo) {
    return request({
      url: `/eduService/course/addCourseInfo`,
      method: 'post',
      data: courseInfo
    })
  },

  // 根据id查询课程信息
  getCourseInfo(courseId) {
    return request({
      url: `/eduService/course/getCourseInfo/${courseId}`,
      method: 'get'
    })
  },

  // 更新课程信息
  updateCourseInfo(courseInfo) {
    return request({
      url: `/eduService/course/updateCourseInfo`,
      method: 'post',
      data: courseInfo
    })
  },

  // 查询课程列表
  getCourseList() {
    return request({
      url: `/eduService/course/getCourseList`,
      method: 'get'
    })
  },

  // 按条件查询课程列表
  getCourseListByCourseQuerey(currentPage, size, courseQuerey) {
    return request({
      url: `/eduService/course/pageListCourseCondition/${currentPage}/${size}`,
      method: 'post',
      data: courseQuerey
    })
  },

  // 删除课程
  deleteCourse(courseId) {
    return request({
      url: `/eduService/course/deleteCourse/${courseId}`,
      method: 'delete'
    })
  }

}
